<div class="row">
	<div class="col-lg-12">
		<h1 class="site-h1">
			用户对话列表
			<div style="float:right;">
				<a href="/agent/clean.html" data-toggle="tip" data-title="清理对话列表将会删除已结束对话，请确认是否清理？">
					<i class="layui-icon" style="font-size:22px;color:red;">&#xe640;</i>
				</a>	
			</div>
		</h1>
		<ul class="dialog-list" id="chat_users">
			<#if agentUserList??>
			<#list agentUserList as agentuser>
			<li class="clearfix chat-list-item <#if curagentuser?? && curagentuser.id == agentuser.id>active</#if>"
				id="agentuser_${agentuser.userid!''}" data-id="${agentuser.userid!''}">
				<img src="<#if agentuser.headimgurl?? && agentuser.headimgurl != ''>${agentuser.headimgurl}<#else>/images/im/user.png</#if>" style="width:45px;height:45px;">
				<#if agentuser.channel?? && agentuser.channel == "weixin">
				<i class="kfont ukefu-channel-icon">&#xe64d;</i>
				<#elseif agentuser.channel?? && agentuser.channel == "webim">
				<i class="kfont ukefu-channel-icon">&#xe60d;</i>
				</#if>
				<div class="dialog-info">
					<div class="address">
						<a href="/agent/agentuser.html?id=${agentuser.id!''}" data-toggle="load" data-target="#ukefu-chat-agent" onclick="$('.chat-list-item.active').removeClass('active');$(this).closest('li.chat-list-item').addClass('active');$('#last_msg_${agentuser.userid!''}').text(0).hide();"> 
							<span>${agentuser.username!''}</span>
						</a>
					</div>
					<div class="news">
						<#if agentUser.servicetime??>${agentuser.servicetime?string('yyyy-MM-dd HH:mm:ss')}<#else>${agentuser.createtime?string('yyyy-MM-dd HH:mm:ss')}</#if> 
						<#if agentuser.status?? && agentuser.status == 'end'>
							<small class="label bg-gray pull-right" id="tip_message_${agentuser.userid!''}">离开</small>
						<#else>
							<small class="label bg-green pull-right" id="tip_message_${agentuser.userid!''}">在线</small>
						</#if>
						
					</div>
				</div>
				<div class="last-msg">
					<small class="ukefu-badge bg-red" id="last_msg_${agentuser.userid!''}" style="<#if agentuser.tokenum == 0 || (curagentuser?? && curagentuser.id == agentuser.id)>display:none;</#if>">${agentuser.tokenum!0}</small>
				</div>
			</li>
			</#list>
			</#if>
		</ul>
	</div>
</div>